package com.aqie.easy.math;

/**
 * 492 构造矩形  todo
 * L W 尽可能差距小, 且必须是正整数
 */
public class ConstructRectangle {
    public int[] constructRectangle(int area) {
        int sqrt = (int) Math.sqrt(area);
        while (area % sqrt != 0) {
            sqrt--;
        }
        return new int[]{area / sqrt, sqrt};
    }
}
